<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<input type="text"  id="shuru" value="" />
		<input class="btn" type="button" value="1" />
		<input class="btn"  type="button" value="2" />
		<input class="btn"  type="button" value="3" />
		<input class="btn"  type="button" value="4" />
		<input class="btn"  type="button" value="5" />
		<input class="btn"  type="button" value="+" />
	</body>
	<script type="text/javascript">
		var shuru = document.querySelector("#shuru");
		var btns = document.querySelectorAll(".btn");
		for (var i=0;i<btns.length;i++) {
			btns[i].onclick = function(){
				shuru.value += this.value;
			}
		}

		
	</script>
</html>
